<?php

/* @var $this yii\web\View */

use yii\helpers\Url;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\helpers\Render;
use common\models\Recruit;
use common\models\Design;

$this->addCrumbs('招聘列表', 'recruit/recruit-list');
$this->title = '招聘详情';
?>

<div class="box-content flyer-form pane gap" id="flyer-create">
    <div class="form-item">
        <div class="input-title">雇主</div>
        <div class="input-block input-mid"><span class="flyer-status blue thin"><i class="icon-user"></i> <?= Render::value($data, 'employer_id') ?>:<?= Render::value($data, 'employer.username') ?></span></div>
    </div>
    <div class="form-item">
        <div class="item-inline">
            <div class="input-title">浏览次数</div>
            <div class="input-inline input-mid"><span class="flyer-status purple thin"><i class="icon-eye-open"></i> <?= Render::number(Render::value($data, 'view', 0)) ?></span></div>
        </div>
        <div class="item-inline">
            <div class="input-title">收藏次数</div>
            <div class="input-inline input-mid"><span class="flyer-status purple thin"><i class="icon-inbox"></i> <?= Render::number(Render::value($data, 'collection', 0)) ?></span></div>
        </div>
    </div>
    <div class="form-item">
        <div class="input-title">标题</div>
        <div class="input-block input-mid"><?= Render::value($data, 'title') ?></div>
    </div>
    <div class="form-item">
        <div class="item-inline">
            <div class="input-title">招聘类型</div>
            <div class="input-inline input-mid"><?= Render::show(Recruit::$typeSelector, Render::value($data, 'type')) ?></div>
        </div>
        <div class="item-inline">
            <div class="input-title">预算</div>
            <div class="input-inline input-mid"><?= Render::text(Recruit::$budgetSelector, Render::value($data, 'budget')) ?></div>
        </div>
    </div>
    <div class="form-item">
        <div class="input-title">分类</div>
        <div class="input-block input-mid"><?= Render::categories('designCategories', Render::value($data, 'categories')) ?></div>
    </div>
    <div class="form-item">
        <div class="item-inline">
            <div class="input-title">设计类型</div>
            <div class="input-inline input-mid"><?= Render::text($modelSelector, Render::value($data, 'models')) ?></div>
        </div>
        <div class="item-inline">
            <div class="input-title">上线平台</div>
            <div class="input-inline input-mid"><?= Render::text(Design::$platformSelector, Render::value($data, 'platforms')) ?></div>
        </div>
        <div class="item-inline">
            <div class="input-title">设计风格</div>
            <div class="input-inline input-mid styles"><?= Render::text(Design::$styleSelector, Render::value($data, 'styles')) ?></div>
        </div>
    </div>
    <div class="form-item">
        <div class="input-title">状态</div>
        <div class="input-block input-mid"><?= Render::show(Recruit::$statusSelector, Render::value($data, 'status')) ?></div>
    </div>
    <div class="form-item item-text">
        <div class="input-title">备注</div>
        <div class="input-block input-mid"><?= Render::value($data, 'remark', '--') ?></div>
    </div>
    <div class="form-item">
        <div class="input-block tr bdn"><a class="flyer-button normal border-round" href="<?= Url::to('@web/recruit/recruit-list') ?>"><i class="icon-reply"></i> 返回列表页</a></div>
    </div>
</div>
<script src="<?= Render::static('flyer/flyer.class.js') ?>"></script>
<script src="<?= Render::static('flyer/checker.class.js') ?>"></script>
<script src="<?= Render::static('system/category-design.data.js') ?>"></script>
<script src="<?= Render::static('flyer/categorier.class.js') ?>"></script>
<script>
    $(document).ready(function() {
        // Form 元素初始化
        (new flyer).init({ form: '#flyer-create' });
    });
</script>